import request from '@/utils/request'

/**
 * 获取所有的实验
 */
export function getEmployees() {
  return request({
    url: '/employee/list.json',
    method: 'get'
  })
}

export function getExes(type) {
  return request({
    url: '/api/exe/getAll?type=' + type,
    method: 'get'
  })
}

/**
 * 新增实验时，获取实验的父亲类型
 */
export function getTypes() {
  return request({
    url: '/api/exp/getRefTypes',
    method: 'get'
  })
}

export function addExp(param) {
  return request({
    url: '/api/exp/add',
    method: 'post',
    data: param
  })
}

export function deleteExp(id) {
  return request({
    url: '/api/exp/del?id' + id,
    method: 'post'
  })
}

// 练习接口

export function addExe(param, extendId) {
  return request({
    url: '/api/exe/add?extendId=' + extendId,
    method: 'post',
    data: param
  })
}

export function modExe(id, del, obj) {
  return request({
    url: '/api/exe/mod?id=' + id + '&del=' + del,
    method: 'post',
    data: obj
  })
}
